/**
 * 价格计算公式验证
 * @param value
 * @private
 */
function _feeFormula(value: String){
  return !!value || '必填'
}

const mixin = {
  data() {
    return {
      rules: {
        required: (value: any) => !!value || '必填',
        freeFormula: _feeFormula,
        discountNumber: (value: number) =>  value <= 1 && value >= 0.1  || '折扣区间为 0.1 - 1'
      }
    }
  }
}

export default mixin